import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import fire from '@dfeidao/atom-web/msg/fire';

export default async function a008(fd: IFeidaoAiBrowserComponent) {
	// todo
	const chk_list = fd.data.node.querySelectorAll('[data-id="listq"]:checked');
	if (chk_list.length === 0) {
		alert("请选择一条数据进行操作");
	} else {
		const chklist = Array.from(chk_list) as HTMLInputElement[];
		const arr = chklist.map((n) => {
			return n.getAttribute('data-no');
		});
		// const arr: string[] = []
		// res.data.map((n) => {
		// 	arr.push(n._id);
		// })
		// console.log(res.data[0]._id);
		// set(fd, '_id5', arr)
		//console.log('aa', arr);
		console.log('ss2s', arr);
		fire('zj-000006', 'a004', arr, 0);
	}
}
